package com.ccc.demoboot.common;

import java.util.HashMap;
import java.util.Map;

public class R {

    private String message;
    private int code;
    private Map<String,Object> datamap;

    public R(){
        this.message="成功";
        this.code=200;
        this.datamap=new HashMap<>();
    }

    public String getMessage() {
        return message;
    }

    public R setMessage(String message) {
        this.message = message;
        return this;
    }

    public int getCode() {
        return code;
    }

    public R setCode(int code) {
        this.code = code;
        return this;
    }

    public Map<String, Object> getDatamap() {
        return datamap;
    }

    public void setDatamap(Map<String, Object> datamap) {
        this.datamap = datamap;
    }
    public R addDatamap(String key,Object value){
        this.datamap.put(key,value);
        return this;
    }
}
